package com.fzshang.commen.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fzshang.commen.bean.User;
import com.fzshang.commen.bean.layuiBean.ResultPage;
import com.fzshang.commen.bean.layuiBean.VoPage;
import com.fzshang.commen.bean.request.Sale;
import com.fzshang.commen.entity.ApiResult;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 账户表 服务类
 * </p>
 *
 * @author 冯政尚
 * @since 2020-01-28
 */
public interface UserService extends IService<User> {

    /**
     * @param account
     * @param passWord
     * @return user登陆
     */
    User UserLogin(String account, String passWord);
    /**
     * @param requestUserName
     * @return 判断用户名是否存在
     */
    User userNameIsNall(String requestUserName);
    /**
     * @param requestUserName
     * @param requestPassWord
     * @return 判断用户名对应的密码是否正确
     */
    User passWordIsNall(String requestUserName, String requestPassWord);

    /**
     * @param voPage
     * @return 后台查询
     */
    ResultPage<User> selectMyPage(VoPage voPage, User user);


    /**
     * @param phone
     * @param account
     * @param passWord
     * @return 审核成功发送短信
     */
    ApiResult SendSMSO(String phone, String account, String passWord);

    /**
     * @param phone
     * @return 审核失败发送短信
     */
    ApiResult SendSMSOError(String phone);

    /**
     * @return 查询商家人数
     */
    List<User> selectByTimeCount() throws Exception;


    /**
     * @return  查询收入统计
     * @throws Exception
     */
    List<Sale> selectMoney() throws Exception;

    //支付
    String zfbPay(User user,HttpServletRequest request) throws AlipayApiException;
    //支付回调
    String aliPayNotify(HttpServletRequest request) throws Exception;
    //添加角色
    ApiResult saveRole(Long userId, String account);
}
